<!DOCTYPE html>
<html xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
    <meta charset="utf-8">
    <title>权限列表--layui后台管理模板 2.0</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="format-detection" content="telephone=no">
    <link rel="stylesheet" href="/layui/css/layui.css" media="all" />
    <link rel="stylesheet" href="/css/public.css" media="all" />
        <!-- endbuild -->
        <style>
            .eleTree {
                width: 350px;
                height: 500px;
                border: 1px solid #ccc;
                overflow: hidden;
                display: inline-block;
                position: absolute;
            }
        </style>
    </head>
    <body>
        <div class="container">
            <form class="layui-form" lay-filter="form-menu" >
                <input id="id" name="id" type="hidden" value="${menu.id}"/>
                <div class="layui-form-item">
                    <label class="layui-form-label">菜单名称：</label>
                    <div class="layui-input-block">
                        <input type="text" name="menuName" placeholder="" autocomplete="off" class="layui-input" value="${menu.menuName}"
                              />
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">显示顺序：</label>
                    <div class="layui-input-block">
                        <input type="text" name="orderNum" placeholder="" autocomplete="off" class="layui-input"
                               value="${menu.orderNum}"/>
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">请求地址：</label>
                    <div class="layui-input-block">
                        <input type="text" name="url" placeholder="" autocomplete="off" class="layui-input"
                               value="${menu.url}"/>
                    </div>
                </div>
                <#if menu.menuType!='D'>
                        <div class="layui-form-item">
                            <label class="layui-form-label">菜单类型：</label>
                            <div class="layui-input-block">
                                ${dict.getLayuiNameRedios("menu_type","menuType","${menu.menuType!''}")}
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <label class="layui-form-label">菜单状态：</label>
                            <div class="layui-input-block">
                                <select name="visible">
                                    <option value="0">显示</option>
                                    <option value="1">隐藏</option>
                                </select>
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <label class="layui-form-label">权限标识：</label>
                            <div class="layui-input-block">
                                <input type="text" name="perms" placeholder="" autocomplete="off" class="layui-input"
                                       value="${(menu.perms)!''}"  />
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <label class="layui-form-label">菜单图标：</label>
                            <div class="layui-input-block">
                                <input type="text" name="icon" placeholder="" autocomplete="off" class="layui-input"
                                       value="${(menu.icon)!''}"   />
                            </div>
                        </div>
                </#if>

                <div class="layui-form-item">
                    <label class="layui-form-label">备注：</label>
                    <div class="layui-input-block">
                        <input type="text" name="remark" placeholder="" autocomplete="off" class="layui-input"
                               value="${menu.remark}"  />
                    </div>
                </div>
                <button class="layui-btn" id="btn-add" style="display:none" lay-submit lay-filter="btn-add">test
                </button>
            </form>
        </div>
        <script type="text/javascript" src="/layui/polyfill.min.js"></script>
        <script type="text/javascript" src="/layui/layui.js"></script>
        <script type="text/javascript" src="/layui/swotadmin.js"></script>

        <script type="text/javascript">
            var prefix = "system/menu";
        </script>
        <script>
            layui.config({
                base: '/js/system/menu/'
            }).use(['add'], function () {
                var add = layui.add;
                var _id = document.getElementById("id").value;
                add.init({
                    "prefix": prefix,
                    "editFlag": true,
                    "id": _id

                });
            });
        </script>
    </body>
</html>